package com.abing.observer.test3.event.listener;

import com.abing.observer.test3.event.OrderMessageEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

/**
 * @date 2019/5/2121:34
 */
@Component
public class SmsListener implements ApplicationListener<OrderMessageEvent> {
    @Override
    @Async
    public void onApplicationEvent(OrderMessageEvent event) {
        System.out.println(Thread.currentThread().getName() + "开始短信消息内容:" + event.getJsonObject().toJSONString());
    }
}
